import { createApp } from 'vue'
import App from './App.vue'
import router from "@/router";

// 全局注册 自定义指令(directive)
import instruct from '@/utils/instruct.ts'

import { setupStore } from "@/store";

// 引入elementPlus
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css'

// 引入element icon
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 样式
import "@/styles/index.scss";


const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// 全局注册 状态管理(store)
setupStore(app);

app.use(router)
app.use(instruct)
app.use(ElementPlus)
app.mount("#app");